<!DOCTYPE html>
<html lang="en">
<@contentmodel contentId=contentId>
    <#include "utils/common.html">
    <meta charset="UTF-8">
    <title>Title</title>
    <#if result ??>
        <#if result.ismarker==false >
            <link rel="stylesheet" href="/tinymce/skins/ui/oxide/skin.min.css" media="all">
            <link rel="stylesheet" href="/tinymce/skins/ui/oxide/content.min.css" media="all">
            <link rel="stylesheet" href="/tinymce/skins/content/default/content.min.css" media="all">
        <#else>
            <link rel="stylesheet" href="/web-frame/editor/css/editormd.preview.css" />
            <link rel="stylesheet" href="/editor/css/style.css" />
            <link rel="stylesheet" href="/editor/css/editormd.css" />
        </#if>
    </#if>
</head>
<body>



            <#if result ??>
                <div>
                    <div align="center" style="padding-top: 20px">
                        <a style="font-size: 30px;font-weight: bold;color: black">${result.title}</a>
                    </div>
                    <div align="center" style="padding-top: 20px">
                        <a>作者: ${result.realname}</a>
                    </div>
                    <br>
                    <div align="center" ><a>创作时间: ${result.createdate}</a></div>
                    <#if result.ismarker==false >
                        <div style="padding-right: 20%;padding-left: 20%">
                            <hr>
                            ${result.content}
                        </div>
                    <#else>
                        <div id="test-editormd-view" style="padding-right: 20%;padding-left: 20%">
                                <textarea class="editormd-html-preview">${result.content}</textarea>
                        </div>
                    </#if>
                </div>
            </#if>

</body>
<#if result ??>
    <#if result.ismarker==true >
        <script src="/js/jquery-1.12.1.min.js"></script>
        <script src="/editor/lib/marked.min.js"></script>
        <script src="/editor/lib/prettify.min.js"></script>

        <script src="/editor/lib/raphael.min.js"></script>
        <script src="/editor/lib/underscore.min.js"></script>
        <script src="/editor/lib/sequence-diagram.min.js"></script>
        <script src="/editor/lib/flowchart.min.js"></script>
        <script src="/editor/lib/jquery.flowchart.min.js"></script>
        <script src="/editor/editormd.js"></script>
    </#if>
</#if>
<script>
    <#if result ??>
        <#if result.ismarker==true >

    $(function() {
        var testEditormdView2;

        testEditormdView2 = editormd.markdownToHTML("test-editormd-view", {
            //   htmlDecode      : "style,script,iframe",  // you can filter tags decode
            htmlDecode      : "style,script,iframe",  // you can filter tags decode
            //toc             : false,
            saveHTMLToTextarea: true,
            tocm            : true,    // Using [TOCM]
            //tocContainer    : "#custom-toc-container", // 自定义 ToC 容器层
            //gfm             : false,
            //tocDropdown     : true,
            // markdownSourceCode : true, // 是否保留 Markdown 源码，即是否删除保存源码的 Textarea 标签
            emoji           : true,
            taskList        : true,
            tex             : true,  // 默认不解析
            flowChart       : true,  // 默认不解析
            sequenceDiagram : true,  // 默认不解析
        });
    });

        </#if>
    </#if>
</script>
</@contentmodel>
</html>